import { _decorator, Component, Node, UITransform } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('BuffControl')
export class BuffControl extends Component {
    start() {

    }

    update(deltaTime: number) {
        
        /**
         * 超出区域后主动销毁
         */

        let p = this.node.getPosition()
        p.y -= 50 * deltaTime * 3;

        
        this.node.setPosition(p)
        
        if (this.node.position.y < -500) {
            this.node.destroy()
        }


    }






}


